package com.uchengwang.ui.cm_ui.uu.bean;

import android.text.TextUtils;

import com.litesuits.orm.db.annotation.Column;
import com.uchengwang.functions.http.manager.OSSManager;
import com.uchengwang.functions.db.dbBean.DbBase;
import com.uchengwang.ui.utils.UCommonUtil;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created by U城网 on 2017/6/13.
 */

public class SpeekBean extends DbBase{
    private int checkCount;
    private int cmtCount;

    @Column("content")
    private String content;
    private long createTime;
    private long id;
    private int likeCount;
    private String nickName;

    @Column("shareImgs")
    private String shareImgs;

    @Column("shareLocation")
    private String shareLocation;
    private int showPermission;
    private long uid;
    private String userAvatar;
    private boolean isLike;
    private boolean isCollect;
    private boolean isFriends;
    private boolean isActive;

    private boolean isExpand;

    private String remarkName;
    private int imgsWidth;
    private int imgsHeight;

    public int getImgsWidth() {
        return imgsWidth;
    }

    public void setImgsWidth(int imgsWidth) {
        this.imgsWidth = imgsWidth;
    }

    public int getImgsHeight() {
        return imgsHeight;
    }

    public void setImgsHeight(int imgsHeight) {
        this.imgsHeight = imgsHeight;
    }

    public String getRemarkName() {
        return remarkName;
    }

    public void setRemarkName(String remarkName) {
        this.remarkName = remarkName;
    }

    public boolean isActive() {
        return isActive;
    }

    public void setActive(boolean active) {
        isActive = active;
    }

    public boolean isFriends() {
        return isFriends;
    }

    public void setFriends(boolean friends) {
        isFriends = friends;
    }

    public boolean isLike() {
        return isLike;
    }

    public void setLike(boolean like) {
        isLike = like;
    }

    public boolean isCollect() {
        return isCollect;
    }

    public void setCollect(boolean collect) {
        isCollect = collect;
    }

    public boolean isExpand() {
        return isExpand;
    }

    public void setExpand(boolean expand) {
        isExpand = expand;
    }

    public List<String> getPhotos(){
        List<String> photos = new ArrayList<>();
        if (!TextUtils.isEmpty(shareImgs)){
            //多张图片放在一个String串里
            List<String> urls = Arrays.asList(shareImgs.split(";"));
            for (String url : urls){
                String imageUrl = UCommonUtil.getUtil().getOssImageUrl(OSSManager.OSS_SHARE) + url;
                photos.add(imageUrl);
            }

        }
        return photos;
    }

    public int getCheckCount() {
        return checkCount;
    }

    public void setCheckCount(int checkCount) {
        this.checkCount = checkCount;
    }

    public int getCmtCount() {
        return cmtCount;
    }

    public void setCmtCount(int cmtCount) {
        this.cmtCount = cmtCount;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(int likeCount) {
        this.likeCount = likeCount;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getShareImgs() {
        return shareImgs;
    }

    public void setShareImgs(String shareImgs) {
        this.shareImgs = shareImgs;
    }

    public String getShareLocation() {
        return shareLocation;
    }

    public void setShareLocation(String shareLocation) {
        this.shareLocation = shareLocation;
    }

    public int getShowPermission() {
        return showPermission;
    }

    public void setShowPermission(int showPermission) {
        this.showPermission = showPermission;
    }

    public long getUid() {
        return uid;
    }

    public void setUid(long uid) {
        this.uid = uid;
    }

    public String getUserAvatar() {
        return userAvatar;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }
}
